Configuring persistence plugins at runtime for EventSourcedBehavior#32601
Configuring persistence plugins at runtime for EventSourcedBehavior#32601
Conversation
2b5cbd1 to
f98e8c4
Compare
| val journal: ClassicActorRef = persistence.journalFor(settings.journalPluginId) | ||
| val snapshotStore: ClassicActorRef = persistence.snapshotStoreFor(settings.snapshotPluginId) | ||
| val journal: ClassicActorRef = | ||
| persistence.journalFor(settings.journalPluginId, settings.journalPluginConfig.getOrElse(ConfigFactory.empty)) |
There was a problem hiding this comment.
Thanks for this PR, I agree that it would be a nice feature. Before merging I would like to see that we can support it all the way in the r2dbc plugin, which currently isn't using that config. I recall we had problems and gave up in the Cassandra plugin akka/akka-persistence-cassandra#694
It's not only about the journal and snapshot. It should work with the queries too.
There was a problem hiding this comment.
Here is the PR for Pekko I was planning to port to Akka too - apache/pekko-projection#225. The r2dbc plugin would just piggyback off that, IIUC. Is this fine?
There was a problem hiding this comment.
Aha, I think I finally understood what you had in mind with potential issues - my comment about projections was not relevant for that.
There was a problem hiding this comment.
My initial thinking is that journal plugin should simply not use the query plugin - the code doing the replay could be shared between journal and query plugins without the need for the former to depend on latter. @patriknw Does that make sense?
Port of apache/pekko#1518.